POV-Ray : Newsgroups : povray.newusers : Vibrate objects in animation : Vibrate objects in animation Server Time
30 Jul 2024 02:14:08 EDT (-0400)
  Vibrate objects in animation  
From: Oleguer Vilella
Date: 21 Nov 2004 12:35:45
Message: <41a0d1f1@news.povray.org>
Hello,

I have some objects declarateds like a union and I want to move them
separately. I used that code:
======================================
object { Slt2 translate <0, -pi, 0>
    translate <1, 0.7*pi*clock, 0>}
======================================
And the object goes down. Is any function to move them like if they are
vibrating?
All the code is:
======================================
#declare Prot = union {
blob { threshold 0.1
sphere { <0, 0, .2>, 1.1, 1 texture { pigment { color Blue} finish { ambient
0.2 diffuse 0.8 phong 1 } } }
sphere { <.3, 0, .3>, 1.1, 1 texture { pigment { color Blue} finish {
ambient 0.2 diffuse 0.8 phong 1 } } }
sphere { <.4, 0, .4>, 5.6, 1 texture { pigment { color Blue} finish {
ambient 0.2 diffuse 0.8 phong 1 } } translate <0, 2, 0> scale 1 }
sphere { <.5, 0, .6>, 5.4, 1.8 texture { pigment { color Blue} finish {
ambient 0.2 diffuse 0.8 phong 1 } } translate <2, 0, 2> scale 1.5 }
sphere { <.8, 0, 1>, 5, 1 texture { pigment { color Blue} finish { ambient
0.2 diffuse 0.8 phong 1 } }translate <-2, 0, 0> }
scale 0.666
translate <160, -10.6, 0>
no_shadow
}

superellipsoid {
<0.1, 1>
pigment { rgb <.9, 0, 0> } finish { ambient 0.2 diffuse 0.8 }
scale <2, 1, 1>
scale 4.9
rotate <23, 56, 60>
rotate y*-50
rotate x*-38.4
translate <165, -20, 0>
no_shadow
}

prism {
cubic_spline
0,
1,
6,
<3, -5>, <3, 5>, <5, 0>, <3, -5>, <3, 5>, <5, 0>
pigment { Green } finish { ambient 0.2 diffuse 0.8 }
scale <0, 0.5, 0.6>
scale 4.9
rotate y*65
rotate z*20
rotate x*45
translate <166.78, -39.5, 0>
no_shadow
}

superellipsoid {
<0.1, 1>
pigment { color Yellow } finish { ambient 0.2 diffuse 0.8 }
scale 3.8
scale <2, 1, 1>
rotate <23, 56, 60>
rotate y*75
rotate x*-30.4
translate <170, -37.2, 0>
no_shadow
}

union {
superellipsoid {
<0.4444, 0.66666667>
pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
scale <0.5, 0.56, 0.6>
scale 5.5
rotate x*-80
rotate y*60
translate <162.9, -46.3, 0> }
sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2
diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2
diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
no_shadow
}

union {
superellipsoid {
<0.4444, 0.66666667>
pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
scale <0.5, 0.56, 0.6>
scale 5.5
rotate x*-80
rotate y*60
translate <175.9, -44.8, 0>
}
sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2
diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2
diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
no_shadow
}
#declare Slt2 = union {
union {
superellipsoid {
<0.25, 0.25>
pigment { White } finish {ambient .2 diffuse .1 specular 0.01 roughness .011
reflection 0.55 metallic}
}
sphere { <0, -1, -1>, 0.4 pigment { color Yellow } finish { ambient 0.1
diffuse 0.8 phong 1 }translate <0, 2, 0.5> scale <0.6667,1,1>}
sphere { <0, -1, -1>, 0.4 pigment { color Yellow } finish { ambient 0.1
diffuse 0.8 phong 1 }translate <0.8, 2, 0.5> scale <0.6667,1,1>}
scale <1.5,1,1>
scale 3.9
rotate z*2
rotate y*0
rotate x*19
translate <170.9, -54.5, 0>
no_shadow
}}}
object { Slt2 translate <0, -pi, 0>
    translate <1, 0.7*pi*clock, 0>}
object { Prot }
======================================

Thanks for any help.

Oleguer


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.